package com.hisysteTopet.hisystepet.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hisysteTopet.hisystepet.bean.PetLifeGoods;
import com.hisysteTopet.hisystepet.mapper.PetLifeGoodsMapper;
import com.hisysteTopet.hisystepet.mapper.PetMapper;
import com.hisysteTopet.hisystepet.service.PetLifeGoodsService;
import com.hisysteTopet.hisystepet.service.PetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class PetLifeGoodsServiceImpl extends ServiceImpl<PetLifeGoodsMapper, PetLifeGoods> implements PetLifeGoodsService {

    @Autowired
    PetLifeGoodsMapper petLifeGoodsMapper;

    @Override
    public List<PetLifeGoods> findAll() {
        return petLifeGoodsMapper.findAll();
    }

    @Override
    public void updateToPriceNum(Integer priceNumber, Integer priceId) {
        petLifeGoodsMapper.updateToPriceNum(priceNumber, priceId);
    }

    @Override
    public PetLifeGoods selectToPetId(Integer priceId) {
        return petLifeGoodsMapper.selectToPriceId(priceId);
    }

    @Override
    public void updatePetLifeGoodsMessage(PetLifeGoods petLifeGoods) {
        petLifeGoodsMapper.updatePetLifeGoodsMessage(petLifeGoods);
    }

    @Override
    public void deletePetLifeGoodsMessageById(String priceId) {
        petLifeGoodsMapper.deletePetLifeGoodsMessageById(priceId);
    }

    @Override
    public void updateToPetLifeGoodsNumByAdmin(Integer lifeGoodsNumber, Integer lifeGoodsId) {
        petLifeGoodsMapper.updateToPetLifeGoodsNumByAdmin(lifeGoodsNumber,lifeGoodsId);
    }

    @Override
    public void insertLifeGoods(String priceName, String url, String introduce, Integer price, Integer num) {
        petLifeGoodsMapper.insertLifeGoods(priceName,url,introduce,price,num);
    }


}
